<!DOCTYPE html>
<html>
<head>
<title>Template</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link rel="stylesheet" type="text/css" href="../ext/resources/css/ext-all.css"/>
<link rel="stylesheet" type="text/css" href="../ext/resources/css/ext-icon.css"/>
<link rel="stylesheet" type="text/css" href="../ext/resources/css/ext-revise.css"/>
<script type="text/javascript" src="../ext/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="../ext/ext-all.js"></script>
<script type="text/javascript" src="../ext/ext-revise.js"></script>
<script type="text/javascript" src="../ext/src/locale/ext-lang-zh_CN.js"></script>
<style type="text/css">
.x-logo-panel {
	font-family: "SimHei", "YouYuan";
	font-size: 25px;
	font-weight: bold;
	padding-left: 70px;
	height: 80px;
	line-height: 80px;
	text-align: center;
	color: #dee2f3;
	background: #4f5055 url(../images/login-logo.png) no-repeat 30px 0;
}
.x-background {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: blue;
	opacity: 0.1;
	filter: alpha(opacity=10);
}
</style>
</head>

<body>
<div class="x-background"></div>
<script type="text/javascript">
Ext.QuickTips.init();
Ext.form.Field.prototype.msgTarget = "side";

var logoPanel = new Ext.Panel({
	border: false,
	baseCls: "x-logo-panel",
	defaults: {
		baseCls: "x-plain"
	},
	items: [{
		html: "数据管理中心"
	}]
});

var loginForm = new Ext.form.FormPanel({
	baseCls: "x-plain",
	style: "margin:10px",
	labelWidth: 60,
	defaults: {
		style: "margin-top:2px",
		width: 220
	},
	items: [{
		xtype: "textfield",
		cls: "User",
		style: "background:#fff no-repeat;padding-left:20px",
		fieldLabel: "账号",
		name: "username",
		allowBlank: false,
		blankText: "请输入账号"
	}, {
		xtype: "textfield",
		cls: "Lock",
		style: "background:#fff no-repeat;padding-left:20px",
		fieldLabel: "密码",
		name: "password",
		inputType: "password",
		allowBlank: false,
		blankText: "请输入密码"
	}]
});

var loginWindow = new Ext.Window({
	renderTo: Ext.getBody(),
	title: "管理认证登录",
	iconCls: "Group",
	width: 360,
	autoHeight: true,
	modal: false,
	closable: false,
	items: [logoPanel, loginForm],
	buttons: [{
		text: "登录",
		iconCls: "UserGo",
		handler: function() {
			if (!loginForm.getForm().isValid()) {
				return;
			}
			window.location.href = "framework.html";
		}
	}, {
		text: "重置",
		iconCls: "Reload",
		handler: function() {
			loginForm.getForm().reset();
		}
	}]
});

Ext.onReady(function() {
	// load login window
	loginWindow.show();
	//loginForm.find("name", "username")[0].focus();
	// add resize event for login window
	Ext.EventManager.onWindowResize(function(){ 
　　	loginWindow.center();　　　　　 
　　});
});
</script>
</body>
</html>
